import { get, post } from '@/utils/axios';

const wcHeaders = {
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded',
  },
};
const demo = {
  //get params传参
  getUserName(param) {
    return get(`/m1/1271886-0-default/getUser/${param}`, null); //params传参时，接口若需要配置config，则需要用null做param的占位符
  },
  //post传参
  addUserName(param) {
    return post(`/m1/1271886-0-default/addUser`, param);
  },
  //query传参
  getData(param) {
    return get('/api/get.favicon', param);
  },
  //获取表格动态列
  getColumns(param) {
    return get('/m1/1271886-0-default/getColumns', param);
  },
  //post传参
  postTest(param) {
    return post('/api/get.favicon', param);
  },

  //获取表格
  getTableColumns(param) {
    return post('/Windchill/servlet/gwc/platform/pmgt/project/getProjectTableInfo', param);
  },
  //设置项目列表表头
  setProjectTableColumns(param) {
    return post('/Windchill/servlet/gwc/platform/pmgt/project/setProjectTableColumns', param);
  },
  //保存项目列表表头
  saveProjectTableColumns(param) {
    return post('/Windchill/servlet/gwc/platform/pmgt/project/saveProjectTableColumns', param);
  },
  //柱状图、折线图
  projectTypeCreate(param) {
    return post(
      '/Windchill/servlet/gwc/platform/pmgt/project/statisticsTable/projectTypeCreate',
      param,
    );
  },
  //饼图
  projectGroup(param) {
    return post('/Windchill/servlet/gwc/platform/pmgt/project/statisticsTable/projectGroup', param);
  },
};

export default demo;
